//
//  goodsList.m
//  WHB_logist
//
//  Created by 徐国庆 on 15/12/18.
//  Copyright (c) 2015年 turing. All rights reserved.
//

#import "goodsList.h"

@implementation goodsList

+(NSDictionary*)JSONKeyPathsByPropertyKey{

    
    return @{
             @"goodsId":@"goodsId",
             @"pushLicensePlate":@"pushLicensePlate",
             @"releaseOrgName":@"releaseOrgName",
             @"releaseOrgAuthStatus":@"releaseOrgAuthStatus",
             @"releaseOrgEvaluationStar":@"releaseOrgEvaluationStar",
             @"releaseOrgEvaluationTimes":@"releaseOrgEvaluationTimes",
             @"startAddressName":@"startAddressName",
             @"endAddressName":@"endAddressName",
             @"mediumType":@"mediumType",
             @"weight":@"weight",
             @"expectFreight":@"expectFreight",
             @"loadGoodsTime":@"loadGoodsTime",
             @"note":@"note",
             @"telNum":@"telNum",
             @"goodsStatus":@"goodsStatus",
             };
}

#pragma mark -
#pragma mark 对字段值进行转换 方法名称格式为:属性+JSONTransformer 否则框架无法识别转换方法
//amount
+(NSValueTransformer*)amountJSONTransformer{
    
    return [MTLValueTransformer reversibleTransformerWithBlock:^id(NSString *amout) {
        return @(amout.floatValue);
    }];
}

//realPrice
+(NSValueTransformer*)realPriceJSONTransformer{
    
    return [MTLValueTransformer reversibleTransformerWithBlock:^id(NSString *realPrice) {
        return @(realPrice.floatValue);
    }];
}


@end
